package model

import "gorm.io/gorm"

type User struct {
	gorm.Model
	Username string `gorm:"type:varchar(30)"`
	Password string `gorm:"type:varchar(32)"`
}
type Comic struct {
	gorm.Model
	Title   string `gorm:"type:varchar(30)"`
	Content string `gorm:"type:varchar(255)"`
}

// 用户和角色关系表
type UserRole struct {
	gorm.Model
	Uid int `gorm:"type:int"`
	Rid int `gorm:"type:int"`
}

// 角色表
type Role struct {
	gorm.Model
	RoleName string `gorm:"type:varchar(30)"`
}
type RoleNode struct {
	gorm.Model
	Rid int `gorm:"type:int"`
	Nid int `gorm:"type:int"`
}
type Node struct {
	gorm.Model
	NodeName string `gorm:"type:varchar(30)"`
}

type Car struct {
	gorm.Model
	CarName  string `gorm:"type:varchar(50)"`
	CarPrice int    `gorm:"type:int"`
	CarNum   string `gorm:"type:varchar(50)"`
}
type CarOrder struct {
	gorm.Model
	Cid       int    `gorm:"type:int"`
	OrderForm string `gorm:"type:varchar(50)"`
	OrderCode string `gorm:"type:varchar(50)"`
	OrderTime string `gorm:"type:varchar(50)"`
}
type CarOrderList struct {
	Id        int    `gorm:"type:int"`
	CarName   string `gorm:"type:varchar(50)"`
	CarPrice  int    `gorm:"type:int"`
	CarNum    string `gorm:"type:varchar(50)"`
	OrderForm string `gorm:"type:varchar(50)"`
	OrderCode string `gorm:"type:varchar(50)"`
	orderTime string `gorm:"type:varchar(50)"`
}
